
import { message } from 'antd';

export async function executeActionAfterReq(res: any, fun: Function) {
  console.log("🚀 ~ file: errorHandle.ts ~ line 5 ~ executeActionAfterReq ~ res", res)
  if (res?.code === 0) {
    message.error(res?.msg || '请求错误');
  } else if (res?.code === 1) {
    await fun();
  }
}

export default {
  executeActionAfterReq,
};
